#!/bin/sh

../bin/rand -seed 1234 -n 100 > out-rand.txt
diff -n -b out-rand.txt test-rand.txt
if [ $? -ne 0 ]; then echo "The random number generator generates different sequence using the same seed, so the test of algorithms that depend on random numbers may fail"; fi

cd ..;
librapath="`pwd`/bin"
echo $librapath
cd test;
oldpath=$PATH
export PATH=$PATH:$librapath
for i in util acve cl acbn acmn idspn mtlearn acopt inference inference/mpe mn dn2mn manual; do
  pushd $i
  ./run.sh
  popd
done

export PATH=$oldpath
